from apps.PO.StudentPO import StudentPO
from apps.mapper.StudentMapper import StudentMapper

class StudentService:
    def __init__(self, stu_po: StudentPO):
        self.stu_po = stu_po
        self.stu_mapper = StudentMapper()

    # 获取所有学生信息
    def get_all_students(self):
        return self.stu_mapper.get_all_student_info()

    # 根据学生ID获取学生信息
    def get_student_by_id(self):
        return self.stu_mapper.get_student_info_by_id(self.stu_po.stu_id)

    # 课程推荐方法
    def recommend_course(self):
        return self.stu_mapper.recommend_course(self.stu_po.stu_id)
